package com.dadaban.mapper;

import com.dadaban.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by liu_yan on 2018/9/16.
 */
public interface UserMapper {

    @Select(value = {"SELECT USR_UID, name, password FROM user"})
    @Results({
            @Result(property = "id", column = "id", javaType = String.class),
            @Result(property = "name", column = "name", javaType = String.class),
            @Result(property = "password", column = "password", javaType = String.class)
    })
    List<User> getAllUsers();
}
